/* 勋章基础样式 - 圆角矩形 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 32px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  text-shadow: 0 1px 1px rgba(255,255,255,0.5);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  position: relative;
  border: 2px solid;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 4px;
  line-height: 1.2;
  padding: 6px 10px;
  word-break: break-all;
}

/* 悬停效果 */
.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* 心动行动 - 青铜级 */
.badge-bronze {
  background: linear-gradient(135deg, #B87333, #CD7F32);
  color: #FFF8DC;
  border-color: #8B4513;
}

/* 渐入佳境 - 银级 */
.badge-silver {
  background: linear-gradient(135deg, #C0C0C0, #E6E8FA);
  color: #2F4F4F;
  border-color: #A9A9A9;
}

/* 身体力行 - 金级 */
.badge-gold {
  background: linear-gradient(135deg, #FFD700, #FFED4E);
  color: #8B4513;
  border-color: #DAA520;
}

/* 知行合一 - 铂金级 */
.badge-platinum {
  background: linear-gradient(135deg, #E5E4E2, #FFFFFF);
  color: #2F4F4F;
  border-color: #C0C0C0;
}

/* 小型勋章变体 */
.badge-sm {
  width: 70px;
  height: 28px;
  font-size: 11px;
  padding: 5px 8px;
}

.badge-lg {
  width: 100px;
  height: 40px;
  font-size: 14px;
  padding: 8px 12px;
}

/* 勋章容器 */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

/* 勋章标题 */
.badge-title {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
  text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .badge {
    width: 75px;
    height: 30px;
    font-size: 11px;
    padding: 5px 8px;
  }
  
  .badge-sm {
    width: 60px;
    height: 25px;
    font-size: 9px;
    padding: 3px 6px;
  }
  
  .badge-lg {
    width: 90px;
    height: 35px;
    font-size: 12px;
    padding: 7px 10px;
  }
}

/* 勋章发光效果 */
.badge-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 5px rgba(255,215,0,0.5);
  }
  to {
    box-shadow: 0 0 15px rgba(255,215,0,0.8);
  }
}

/* 特殊效果类 */
.badge-sparkle::before {
  content: '✨';
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 10px;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
